//
//  BaseTabBarViewController.m
//  TravelFirst
//
//  Created by lanou3g on 15/9/18.
//  Copyright (c) 2015年 吴娅君. All rights reserved.
//

#import "BaseTabBarViewController.h"
#import "MytravelTableViewController.h"
#import "TravelActivityTableViewController.h"
#import "TravelltineraryViewController.h"
#import "TravelNotesViewController.h"
@interface BaseTabBarViewController ()

@end

@implementation BaseTabBarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    TravelActivityTableViewController *mainMusicVC = [[TravelActivityTableViewController alloc] init];
    TravelNotesViewController *topMusicVC = [[TravelNotesViewController alloc] init];
    
    TravelltineraryViewController *classMusicVC = [[TravelltineraryViewController alloc] init];
    MytravelTableViewController *myMusicVC = [[MytravelTableViewController alloc] init];
    [self addChildVC:mainMusicVC title:@"活动" imageName:@"icon_activity_57x49@2x" selectedImage:@""];
    [self addChildVC:topMusicVC title:@"游记" imageName:@"icon_travels_57x49@2x" selectedImage:@""];
//    topMusicVC.tabBarItem.title = @"游记";
//    topMusicVC.tabBarItem.image = [UIImage imageNamed:@"icon_travels_57x49@2x"];
    //UINavigationController *topMusicNavC = [UINavigationController]
    //[self addChildViewController:topMusicVC];
    [self addChildVC:classMusicVC title:@"路线" imageName:@"icon_route_57x49@2x" selectedImage:@""];
    [self addChildVC:myMusicVC title:@"我的" imageName:@"icon_me_57x49@2x" selectedImage:@""];
    
}



- (void)addChildVC:(UIViewController *)childVC title:(NSString *)title imageName:(NSString *)imageName selectedImage:(NSString *)selectedImage{
    childVC.tabBarItem.image = [UIImage imageNamed:imageName];
    childVC.tabBarItem.selectedImage = [[UIImage imageNamed:selectedImage] imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)];
    UINavigationController *childNVC = [[UINavigationController alloc] initWithRootViewController:childVC];
    childNVC.tabBarItem.title = title;
    [self addChildViewController:childNVC];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
